package com.liuyucheng.designpattern.建造者模式;

public class Worker extends Builder{

    private Product product;

    public Worker() {
        this.product = new Product();
    }

    @Override
    void build1() {
        product.setBuildA("可乐");
        System.out.println("可乐");
    }

    @Override
    void build2() {
        product.setBuildB("汉堡");
        System.out.println("汉堡");
    }

    @Override
    void build3() {
        product.setBuildC("薯条");
        System.out.println("薯条");
    }

    @Override
    void build4() {
        product.setBuildD("鸡翅");
        System.out.println("鸡翅");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
